<?php
// Set include path
$paths[] = BASE_DIR . DS . 'lib';
$paths[] = BASE_DIR . DS . 'app' . DS . 'module' . DS . 'local';
$paths[] = BASE_DIR . DS . 'app' . DS . 'module' . DS . 'core';

$appPath = implode(PS, $paths);
set_include_path($appPath . PS . get_include_path());

// compensate for magic quotes if necessary
if (get_magic_quotes_gpc())
{
	function _stripslashes_rcurs($variable, $top = true)
	{
		$clean_data = array();
		foreach ($variable as $key => $value)
		{
			$key = ($top) ? $key : stripslashes($key);
			$clean_data[$key] = (is_array($value)) ?
			stripslashes_rcurs($value, false) : stripslashes($value);
		}
		return $clean_data;
	}
	$_GET = _stripslashes_rcurs($_GET);
	$_POST = _stripslashes_rcurs($_POST);
}